import Vue from 'vue'

const vm = new Vue()

// 按需导出消息提示的 API

export const messageTip = function (type, msg) {
  switch (type) {
    case 'success': return vm.$message.success({ showClose: true, duration: '2100', message: msg })
    case 'error': return vm.$message.error({ showClose: true, duration: '2100', message: msg })
    case 'info': return vm.$message.info({ showClose: true, duration: '2100', message: msg })
    case 'warning': return vm.$message.warning({ showClose: true, duration: '2100', message: msg })
  }
}
